<template>
  <div class="mv">
    <ul class="mvlist">
      <router-link :to="`/singermv/${id}/${item.id}`"  v-for="(item,index) in mvList" :key="index" tag='li'>
        <img :src="item.imgurl">
        <span>{{item.name}}</span>
      </router-link>
    </ul>
  </div>
</template>
<script>
export default {
  props:['id'],
  data(){
    return{
      mvList:[],
      MVid:''
    }
  },
  created(){
    this.$http.get('/artist/mv',{
      params:{
        id:this.id
      }
    }).then(d=>{
      this.mvList = d.data.mvs;
      console.log('mv',this.mvList);
    })
  }
}
</script>
<style lang="less" scoped>
.mvlist{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  li{
  width: 48%;
  position: relative;
  height: 25vh;
  overflow: hidden;
  text-align: center;
  img{
    height: 80%;
    border-radius: 20px;
    width: 100%;
  }
  span{
    font-size: 12px;
    color: #333;
    margin-top: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
}
}

</style>